home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Processes
/
ProcessLoop.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
594b
|
31 lines
// ProcessLoop.cp
#ifndef ProcessLoop_h
#include "ProcessLoop.h"
#endif
#ifndef ProcessError_h
#include "ProcessError.h"
#endif
const ProcessSerialNumber ProcessLoop::noProcess = { 0, kNoProcess };
ProcessLoop::ProcessLoop()
: process( noProcess ),
finished( false )
{
operator++();
}
void ProcessLoop::operator++()
{
ProcessSerialNumber number( process.Number() );
ThrowProcessError( GetNextProcess( &number ) );
if ( number.highLongOfPSN == noProcess.highLongOfPSN
&& number.lowLongOfPSN == noProcess.lowLongOfPSN )
finished = true;
else
process = number;
}